package com.gitee.fastmybatis.core.support;

import com.gitee.fastmybatis.core.mapper.CrudMapper;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 通用service<br>
 * 使用方式：
 * <pre>
 * <code>
 * {@literal
 * @Service
 * public class UserService extends BaseService<TUser, Integer, TUserMapper> {
 *
 * }
 * }
 * </code>
 * </pre>
 *
 * @param <E>      实体类，如：Student
 * @param <I>      主键类型，如：Long，Integer
 * @param <Mapper> Mapper接口
 * @author thc
 * @since 1.11.1
 */
public abstract class BaseService<E, I, Mapper extends CrudMapper<E, I>> implements IService<E, I> {

    @Autowired
    private Mapper mapper;

    @Override
    public Mapper getMapper() {
        return mapper;
    }
}
